<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta content="telephone=no" name="format-detection">
<%-- <link rel="stylesheet" href="<%=request.getContextPath()%>/resources/lib/jQuery-tck/css/common.css"/> --%>

<title>Insert title here</title>

 <script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/common/js/jquery.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/common/js/jquery.dataTables.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/common/js/bootstrap.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/common/js/jquery.ztree.all.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/common/js/bootstrapValidator.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/common/js/common.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/resources/contract/js/contractSubs.js"></script> 



<link rel="stylesheet"
	href="<%=request.getContextPath()%>/resources/common/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/resources/common/css/jquery.dataTables.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/resources/common/css/bootstrapValidator.min.css" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/resources/common/css/zTreeStyle.css" />

</head>
<body>
<!-- 	</br>
	<button class="btn btn-danger btn-sm" id="deleteAll" onclick="deleteallcontract()">批量删除</button>
	<button class="btn btn-primary btn-sm addBtn" id="addcontract_id" onclick="contractadd()">
	  	新建项目</button>
	</br></br> -->
	<div>
	<%-- 当前位置>>><a href="<%=request.getContextPath()%>/contract/contract">合同</a>>>>合同详情 --%>
	<input type="hidden" value="${contractid }" id="getContractid"/>
		<table id="example_contractSub" class="table table-bordered table-header">
			<thead>
				<tr>
					<th>全选</br> <input type="checkbox" id="allChecked" /></th>
					<th>id</th>
					<th>应还金额</th>
					<th>还款日期</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>
	</div>
	
	<!-- 新增项目弹框 -->
	<div class="modal fade" id="myModal-addcontract-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">新建合同</h4>
				</div>
				<form class="form-horizontal" role="form" action="" method="post"
					id="category_addcontract">
					<div class="modal-body">
						<div class="form-group">
						 <label class="col-sm-3 control-label no-padding-right">项目名称：
							</label>
							<div class="col-sm-9">
								<select type="text" class="form-control" id="selectContractName"
									name="projectId" style="width: 250px" maxlength="5"
									placeholder="5位以内数字" ></select>
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">申请金额：
							</label>
							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="sum" id="contractProjectMoneyid" style="width: 250px" maxlength="10"
									placeholder="10个以内汉字" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">还款方式：
							</label>
							<div class="col-sm-9">
								<select type="text" class=" sortNumber form-control"
									name="repaymentMethod" id="contractSelectrepaymentMethod" style="width: 250px">
										<option value="6" >一年后6期</option>
										<option value="12">一年后12期</option>
										<option value="24">一年后24期</option>
									</select>
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">签订日期：
							</label>
							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="date" id="contractDateId" style="width: 250px"maxlength="10"
									placeholder="10位以内数字" />
							</div>
						</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default"
							data-dismiss="modal">关闭</button>
						<button type="button" class="btn btn-primary"
							onclick="addcontracttj()">提交</button>
					</div>
				</form>
			</div>
		</div>
	</div>

<!-- 修改项目 -->
	<div class="modal fade" id="myModal-updatacontract-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">新建项目</h4>
				</div>
				<form class="form-horizontal" role="form" action="" method="post"
					id="category_updatacontract">	
					    <!-- 获取ID用 -->									
						<div class="form-group">				
							<div class="col-sm-9">
								<input type="hidden" class="form-control" id="brandid111" name="id" />
							</div>
						</div>
					
					<div class="modal-body">
						<div class="form-group">
						 <label class="col-sm-3 control-label no-padding-right">公司ID：
							</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="cidid1"
									name="cid" style="width: 250px" maxlength="5"
									placeholder="5位以内数字" />
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">项目名称：
							</label>
							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="contractname" id="contractnameid1" style="width: 250px" maxlength="10"
									placeholder="10个以内汉字" />
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">项目编号：
							</label>
							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="contractnum" id="contractnumid1" style="width: 250px"maxlength="10"
									placeholder="10位以内数字" />
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">项目详情：
							</label>
							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="contractdetial" id="contractdetialid1" style="width: 250px"maxlength="15"
									placeholder="15个以内汉字" />
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">1:通过/2:不通过：
							</label>
							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="state" id="state1" style="width: 250px"maxlength="1"
									placeholder="填写1或2" />
							</div>
						</div>
						
						
					 <div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">项目资金：
							</label>
							<div class="col-sm-9">
								<input type="text" class=" sortNumber form-control"
									name="contractmoney" id="contractmoney1" style="width: 250px"maxlength="5"
									placeholder="5位以内数字" />
							</div>
						</div>
					</div>
					
					<div class="modal-footer">
						<button type="button" class="btn btn-default"
							data-dismiss="modal">关闭</button>
						<button type="button" class="btn btn-primary"
							onclick="updatacontracttj()">提交</button>
					</div>
				</form>
			</div>
		</div>
	</div>
<!--删除 -->
<div class="modal fade" id="myModal-deletecontract-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">删除项目</h4>
				</div>
				<form class="form-horizontal" role="form" action="" method="post"
					id="category_updatacontract">
					 <!-- 获取ID用 -->									
						<div class="form-group">				
							<div class="col-sm-9">
								<input type="hidden" class="form-control" id="deleteid"  />
							</div>
						</div>	
					<div class="modal-body">
						<div class="shanchu" style="font-size:20px ">
						 <p>确定删除该项目？</p>	
						</div>
						<div class="modal-footer">
						<button type="button" class="btn btn-default"
							data-dismiss="modal">关闭</button>
						<button type="button" class="btn btn-primary"
							onclick="deletecontracttj()">提交</button>
					   </div>	
				</form>
			</div>
		</div>
<!--批量删除 -->
<div class="modal fade" id="myModal-deleteall-contract-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		
</div>

   <script type="text/javascript">
		$(function() {
			//全选/全不选
			$("#allChecked").click(function() {
				var isChecked = this.checked;
				$("input[name='id']").each(function() {
					this.checked = isChecked;
				});
			});
		});
	</script>
				
</body>
</html>